import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

// 导入全局注册的路由
import configRouters from "../views/layout/routes"
Vue.use(VueRouter);

// 定义静态路由
const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
];
const router = new VueRouter({
  routes
});

// 添加全局自动注册的路由
router.addRoutes(configRouters)

export default router;